﻿<Window x:Class="AndroidXmlDemo.Views.MainView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:ViewModels="clr-namespace:AndroidXmlDemo.ViewModels" mc:Ignorable="d"
        d:DataContext="{d:DesignInstance Type=ViewModels:MainViewModel, IsDesignTimeCreatable=False}"
        Title="Android XML Reader" Height="350" Width="525">
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="75" />
        <ColumnDefinition Width="75" />
        <ColumnDefinition Width="75" />
      </Grid.ColumnDefinitions>
      <TextBox Margin="5" Text="{Binding Filename}" />
      <Button Grid.Column="1" Margin="5" Command="{Binding BrowseCommand}">Browse</Button>
      <Button Grid.Column="2" Margin="5" Command="{Binding LoadCommand}">Load</Button>
      <Button Grid.Column="3" Margin="5" Command="{Binding ShowStringPoolCommand}"
              CommandParameter="{Binding Reader.StringPool}">Pool</Button>
    </Grid>
    <FlowDocumentScrollViewer Grid.Row="1" Margin="2" Document="{Binding FormattedDocument}" />
  </Grid>
</Window>